import { createApp } from 'vue'
import App from './App.vue'
import router from './router'

import  ElementPlus  from 'element-plus'
import 'element-plus/dist/index.css'
const app = createApp(App)
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import { createPinia } from 'pinia'
import "@/api/mock.js"
import api from '@/api/api'
const pinia = createPinia()
//在任何 Vue 组件中可通过 this.$api 访问
app.config.globalProperties.$api=api
app.use(pinia)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
  app.use(ElementPlus)
app.use(router).mount('#app')
